import request from '@/utils/request'
import BaseCURDApi from '@/framework/infra/base/BaseCURDApi'

class RoleApi extends BaseCURDApi {
  constructor() {
    super('role')
  }

  roleListAll = () => this.get('list-all')

  queryRoleCodeList = (roleId) => this.get('code-list', { roleId })
  saveRoleCodeList = (roleId, codeList) => this.post('save-role-code-list', { roleId, codeList })
}

export const roleApi = new RoleApi()
